<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js" type="text/javascript"></script>
</head>

<body>
    <div id="root">
        单向数据绑定:<input type="text" v-bind:value="name">
        <hr />
        <!--v-model只能用于表单类元素(输入类元素)-->
        双向数据绑定:<input type="text" v-model:value="name">
        <!-- 双向数据绑定简写:<input type="text" v-model="name"> -->
    </div>
    <script>
        new Vue({
            el: '#root',
            data: {
                name: '张三'
            }
        })
    </script>
</body>

</html>